package com.example.stock.vo;

import lombok.Data;
import org.springframework.util.comparator.Comparators;

import java.time.LocalDateTime;
import java.util.Comparator;

/**
 * <p>
 * </p>
 *
 * @author zcf
 * @since 2021/7/23
 */
@Data
public class PercentVo implements Comparable<PercentVo> {
    private Double price;

    private Double prePrice;

    private LocalDateTime dateTime;

    private Double percent;


    @Override
    public int compareTo(PercentVo o) {
        return Double.valueOf(Math.abs(o.getPercent())).compareTo(Math.abs(percent));
    }
}
